prison_architectfandomcom-20200222-history
Savefile Format
This article is about the Prison Architect save file Format ".prison" file. Its aim is to document every parameter of the save file. The save file consists of organized, human readable text, and can be edited with a basic text editor. Editing the save file can be used to change some settings, hack in something, fix some glitches & bugs, and of course, to cheat. Basics and Format Prison Architect is a 2D game. It uses X and Y coordinates in a grid format. In game, X is left-right, Y is top-bottom. The save file contains "Head" entries followed by multiple "BEGIN ... END" block entries. Some of those entries have more "BEGIN ... END" block entries inside them. .prison The .prison format is the way games are saved in Prison Architect. They are very simply put, just .txt files. The .prison file defines all features of a prison, including the progress of Research and the daily Regime. Location Save files can be found from the main menu in Prison Architect by selecting the "Open Save Folder" option. Alternatively, save files can be found in the following locations, depending on the operating system being run and the version of the game installed (e.g. Steam vs standalone): General Concepts Each object is given an Id.i and an Id.u, which are two separate identifier numbers. Id.i is unique to that object type while Id.u is unique to the whole game. The next Id.u to be used is stored as ObjectId.next. Header .prison files begin with a header of basic information. Some of your entries might be missing. This happens when they match their default value. You can still add them manually to the save file if you wish to change it's value. Version alpha-35 NumCellsX 300 NumCellsY 160 OriginX 0 OriginY 0 OriginW 200 OriginH 160 TimeIndex 104234. TimeWarpFactor 0.500000 RandomSeed 242 SecondsPlayed 180430 ObjectId.next 2982405 EnabledElectricity true EnabledWater true EnabledFood true EnabledGangs EnabledMisconduct true EnabledDecay true EnabledVisibility true ImmediateMaterials false ObjectsCentreAligned true FailureConditions true FoodVariation 3 LethalForce true BioVersions 4 CeoLetterRead true Intake.next 105599. Intake.numPrisoners 14 Intake.reqMin true Intake.reqNormal false Intake.reqMax true On the forums, Chris has stated that adding the text below will make it so "All materials will be delivered by truck, and your workmen will spend a lot of time unloading them. Workmen will no longer be able to teleport materials around" ImmediateMaterials false NumCellsX specifies the width of the game area and NumCellsY specifies the height of the game area. When altered to a larger number, the map increases downward and to the right, the defined number of tiles. When the size is decreased, all items that were beyond the edge of the map are visible on the very edge of the newly sized map. If the map is increased once again, the original positions of the items are retained. * Version ** Description: Version of Prison Architect that the save file was created with. ** Default value: game version ** Value type: text ** Example value: alpha-6 * NumCellsX ** Description: Size of the map from left to right. This includes any purchased land as well. ** Default value: Large map = 200, Medium map = 150, Small map = 100 ** Value type: integer ** Example value: 200 * NumCellsY ** Description: Size of the map from top to bottom. This includes any purchased land as well. ** Default value: Large map = 160, Medium map = 120, Small map = 80 ** Value type: integer ** Example value: 160 * OriginX ** Description: Road position on map from left to right. ** Default value: 0 ** Value type: integer ** Example value: 100 * OriginY ** Description: Road position on map from top to bottom. ** Default value: 0 ** Value type: integer ** Example value: 80 * OriginW ** Description: Default width of the map. ** Default value: Large map = 200, Medium map = 150, Small map = 100 ** Value type: integer ** Example value: 200 * OriginH ** Description: Default height of the map. ** Default value: Large map = 160, Medium map = 120, Small map = 80 ** Value type: integer ** Example value: 160 * TimeIndex ** Description: Total in game time passed. 60 units is equal to 1 in-game hour. For example: a value of 1440 is 1 in-game day. ** Default value: 480.000 ** Value type: float ** Example value: 30503.2 * TimeWarpFactor ** Description: How fast in-game time will go. Note: Setting it to 1.00000 would mean 1 in-game hour would pass in 60 real life seconds, setting it to 2.00000 would mean 1 in-game hour would pass in 30 real life seconds, Setting it to 0.50000 would mean 1 in-game hour would pass in 120 real life seconds. ** Default value: Large map = 0.50000, Medium map = 0.75000, Small map = 1.00000 ** Value type: float ** Example value: 0.500000 * RandomSeed ** Description: Randomly generated map. ** Default value: default value ** Value type: 32-bit signed integer (-2147483647 to 2147483647) ** Example value: 11656 ** If this value is omitted or equal to zero, the game will generate a new positive value (although it does accept negative values in the savefile). * SecondsPlayed ** Description: Total amount of seconds that map has been played. ** Default value: 0 ** Value type: integer ** Example value: 180059 * ObjectId.next ** Description: next unique id that will be assigned to an object. ** Default value: default value ** Value type: integer ** Example value: 2983450 * EnabledElectricity ** Description: If set to false, you will have unlimited electricity. You won't need electric cables or a power station. ** Default value: true ** Value type: boolean ** Example value: false * EnabledWater ** Description: If set to false, you will have unlimited water. You won't need pipes or a water station. ** Default value: true ** Value type: boolean ** Example value: false * EnabledFood ** Description: If set to false, cooks will not cook or serve food. Prisoners will get hungry and will complain about it, though. ** Default value: true ** Value type: boolean ** Example value: false * EnabledMisconduct ** Description: if set to false, prisoners will not riot or break prison rules. ** Default value: true ** Value type: boolean ** Example value: false * EnabledGangs ** Description: If set to true, some prisoners will be in gangs and join in fights together. ** Default value: false ** Value type: boolean ** Example value: true * EnabledDecay ** Description: If set to false, everything would stop getting dirty and dirty things will stay clean once cleaned. (Cell's Con will stop going down). Note: Blood from fights will still show up. ** Default value: true ** Value type: boolean ** Example value: false * EnabledVisibility ** Description: Determines if FOW(Fog Of War) is on or off. ** Default value: true ** Value type: boolean ** Example value: false * ImmediateMaterials ** Description: If set to false, all materials will be delivered by truck and Workmen will no longer be able to teleport materials around. ** Default value: true ** Value type: boolean ** Example value: false * EnabledIntake ** Description: Determines if continuous intake of prisoners is on or off. ** Default value: true ** Value type: boolean ** Example value: false *'EnabledEvents' **Description: If set to true random events will pop up while you run your prison. If set to false you wont get said events. Can be toggleable ingame through only the 'Create New Prison' prompt. **IMPORTANT: If you set 'EnabledEvents' to 'false' while you have an event currently running. That event will stay on your todo list indefinitely. In order to remove these events, press Ctrl-F and try finding the exact line "BEGIN Events". Then delete the text between "BEGIN ActiveEvents" and the "END" tag associated with it (Not neccesarily the first "END" that comes after it!). Remember to delete the "BEGIN ActiveEvents" and its "END" tag as well. ** Default value: false ** Value type: boolean ** Example value: true * ObjectsCentreAligned ** Description: (Unknown) ** Default value: true ** Value type: boolean ** Example value: false * FailureConditions ** Description: Determines if failure conditions is on or off. ** Default value: true ** Value type: boolean ** Example value: false * FoodQuantity ** Description: Determines the amount of food quantity in the prison. ** Default value: 2 ** Possible values: 1 = Low, 2 = Medium, 3 = High. ** Value type: integer ** Example value: 3 * FoodVariation ** Description: Determines the food variety in the prison. ** Default value: 2 ** Possible values: 0 = None, 1 = Low, 2 = Medium, 3 = High. ** Value type: integer ** Example value: 3 * LethalForce ** Description: Determines if freefire is activated or deactivated. ** Default value: false ** Value type: boolean ** Example value: true * BioVersions ** Description: (Unknown). Note: Even if you edit it, once you save your game it will revert to the default value of 4. ** Default value: 4 ** Value type: integer ** Example value: 2 * CeoLetterRead ** Description: Determines if the CEO letter was read in that prison or not. ** Default value: false ** Value type: boolean ** Example value: true * Intake.next ** Description: The time when the next prisoner intake will happen. (in seconds). ** Default value: 1919.00 ** Value type: float ** Example value: 105599.00 * Intake.numPrisoners ** Description: The number of prisoners that will arrive at the next prisoner intake. ** Default value: 8 ** Value type: integer ** Example value: 19 * Intake.reqMin ** Description: Determines if low risk prisoners are set to open. ** Default value: false ** Value type: boolean ** Example value: true * Intake.reqNormal ** Description: Determines if normal risk prisoners are set to open. ** Default value: true ** Value type: boolean ** Example value: false * Intake.reqMax ** Description: Determines if maximum risk prisoners are set to open. ** Default value: false ** Value type: boolean ** Example value: true Cells This entry stores data after the "Header" data level. It defines what material is located in a tile location. If a map is 200x160 tiles in size, "0 0" refers to the top-left most tile, "0 1" is the second tile below the top-most tile, "199 159" will be bottom-right most tile. BEGIN Cells BEGIN "0 0" Mat PavingStone Con 37.8430 END BEGIN "0 1" Mat Sand Con 18.5168 END BEGIN "0 2" Con 6.91396 END BEGIN "0 3" Mat PavingStone Con 31.9050 END BEGIN "0 3" Mat BrickWall Con 58.4516 Ind true END BEGIN "0 4" Mat Grass Con 78.3275 Room.i 27 Room.u 277797 END END The first two numbers are the co-ordinates of the cell in question. In the above example, cell 0,0 is made of paving stones, whilst cell 0,1 is sand. If a cell is considered 'Inside' the cell will contain an attribute 'Ind' with a value of true. This will be absent for outside cells. Each cell also contains a reference to the Room ID and Unique Id if it forms part of a room. *'Mat' **Description: Materials name. **Default value: Dirt ** Possible value: List of Materials **Value type: text **Example value: BrickWall *'Con' **Description: Condition of the Material. (How damaged it is). ** Default value: default value **Possible values: from 0.00000(Worst condition) to 100.00000(Best condition) **Value type: float **Example value: 0.00000 *'Room.i' **Description: Room's ID. ** Default value: default value **Value type: integer **Example value: 19 *'Room.u' **Description: Room's Unique ID. ** Default value: default value **Value type: integer **Example value: 779284 *'Ind' **Description: Determines if the current tile is indoors. **Default value: false **Value type: boolean **Example value: true The following materials can be used: BrickWall Building BuildingConcrete BuildingFrame BurntFloor BurntWall CancelJobs CeramicFloor ClearIndoorArea ConcreteFloor ConcreteTiles ConcreteWall Demolish DemolishWalls Dirt FancyTiles Fence Grass Gravel LongGrass MarbleTiles MetalFloor MosaicFloor Mud None PavingStone PerimeterWall RemoveTunnels Road RoadMarkings RoadMarkingsLeft RoadMarkingsRight Roof Sand Stone Water WhiteTiles WoodenFloor Objects This entry defines each object attributes after the "Cells" data. This includes general objects (beds, tables, doors, etc,), your staff (work-mans, guards, warden, accountant, etc.) and your prisoners. BEGIN "1045" Id.i 1045 Id.u 550275 Type Bench SubType 0 Pos.x 108.5000 Pos.y 65.00000 Or.x -1.000000 Or.y 0.0000000 END The number in brackets states the id of the object. In the above example, you can see a single object, being a bench with id "1045", unique identifier "550275", type "Bench", sub-type "0", position x in "108.5000" and position y in "65.00000". If an object has orientation will have the attributes Or.x and Or.y. Each object can have more optional attributes. Required attributes * Id.i **Description: Object list's id. **Default value: default value **Value type: integer * Id.u **Description: Object's unique id for the game. **Default value: default value **Value type: integer * Type **Description: The type of object to be displayed. **Default value: default value **Value type: text * SubType **Description: The Sub-type or skin of the object. **Default value: default value **Value type: integer * Pos.x **Description: Cell's position from left to right. **Default value: default value **Value type: float * Pos.y **Description: Cell's position from top to bottom. **Default value: default value **Value type: float Optional attributes * Or.x **Description: Orientation in the x axis. **Default value: 0 **Possible values: -1 (up), 0 (not going up or down), 1 (down) **Value type: integer * Or.y **Description: Orientation in the y axis. **Default value: 0 **Possible values: -1(left), 0 (right), 1 (right) **Value type: integer * Powered **Description: Determines if the object has electrical power. **Default value: false **Value type: boolean * On **Description: Determines if the object is on or off. **Default value: false **Value type: boolean __FORCETOC__ Category:Tips & Tricks Category:Prison Architect